package model.components.nodes.node.virtual;

import model.components.nodes.node.Node;

public class VirtualRouter extends VirtualNode
{
	public VirtualRouter( String networkName, int number, String os, int cpu, int ram )
	{
		super( networkName, 0, 0, VirtualRouter.class.getSimpleName(), number, Node.ROUTER_TYPE, os, cpu, ram, Node.GREY_ROUTER, Node.GREEN_ROUTER, Node.YELLOW_ROUTER, Node.RED_ROUTER );
	}
	
	public VirtualRouter( String networkName, int startingDate, int endingDate, int number, String os, int cpu, int ram )
	{
		super( networkName, startingDate, endingDate, VirtualRouter.class.getSimpleName(), number, Node.ROUTER_TYPE, os, cpu, ram, Node.GREY_ROUTER, Node.GREEN_ROUTER, Node.YELLOW_ROUTER, Node.RED_ROUTER );
	}
	
	@Override
	public VirtualRouter getCopy()
	{
		VirtualRouter virtualRouter = new VirtualRouter( this.getNetworkName(), this.getStartingDate(), this.getEndingDate(), this.getNumber(), this.getOS(), this.getCPU(), this.getRAM() );
		virtualRouter.setInitialNumber( this.getInitialNumber() );
		virtualRouter.setNamePrefix( this.getNamePrefix() );
		virtualRouter.setType( this.getType() );
		virtualRouter.setTimeStamp( this.getTimeStamp() );
		
		if( this.getSdnNode() != null )
			virtualRouter.setSdnNode( this.getSdnNode().getSoftCopy() );
		
		virtualRouter.setSelected( this.isSelected() );
		virtualRouter.setCPUprice( this.getCPUprice() );
		virtualRouter.setRAMprice( this.getRAMprice() );
		
		return virtualRouter;
	}

}
